package com.qiaofang.applet.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: youqing.yang
 * @Create: 2020/12/05 13:45
 * @Description:
 **/
@Getter
@AllArgsConstructor
public enum  MyHouseStatusConstants {

    IN_STOCK("出售","出售","有效"),
    SOLD("已售","出售","已售"),
    ON_RENT("出租","出租","有效"),
    RENTED("已租","出租","已租")
    ;
    private String param;

    private String tradeType;

    private String tradeStatus;


    public static String getTradeTypeByParam(String param){
        for (MyHouseStatusConstants item : values()) {
            if (item.getParam().equals(param)){
                return item.getTradeType();
            }
        }
        return null;
    }

    public static String getTradeStatusByParam(String param){
        for (MyHouseStatusConstants item : values()) {
            if (item.getParam().equals(param)){
                return item.getTradeStatus();
            }
        }
        return null;
    }


}
